/**
 * @Author jiande.gao
 * @Date 2017/12/20
 * @Description TODO
 */
import { Injectable } from '@angular/core';
import { BaseService } from '../../shared/respository/base.service';
import { environment } from '../../../environments/environment';
import { SERVER } from '../../shared/config/server.config';

@Injectable()
export class DashboardService {
  constructor(
    private http: BaseService
  ) {}

  getProjectOverview() {
    return this.http.get(SERVER.pm,
      '/api/v1.0/project/projectOverview/' + localStorage.getItem('companyId'))
      .toPromise()
      .then((data: any) => {
        if (data.code === 200) {
          return data.data;
        } else {
          console.log(data);
        }
      }).catch((err) => console.log(err));
  }
}
